
<h2>발생경보관리</h2>
<div class="content">
  <section class="accordion">
    <h3>검색조건</h3>
    <div>
      <form id="form1" name="form1" method="post" action="">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="searchTb">
          <tr>
            <th scope="row">발생제목</th>
            <td><input name="textfield5" type="text" class="" id="textfield5" /></td>
            <th scope="row">발령기관</th>
            <td><input name="textfield6" type="text" class="" id="textfield6" /></td>
          </tr>
          <tr>
            <th scope="row">발령구분</th>
            <td><select name="select" id="select">
            	<option >전체</option>
                  <option>발생예보</option>          
                  <option>발생주의보</option>
                  <option>발생경보</option>  
                </select></td>
            <th scope="row">병해충명</th>
            <td><select name="select7" id="select7">
                  <option>전체</option>
                  <option>소나무 재선충병</option>
                  <option>솔잎혹파리</option>
                  <option>솔껍질 깍지벌레</option>
                </select></td>
          </tr>
          <tr>
            <th rowspan="2" scope="row">기간설정</th>
            <td colspan="3"><input type="radio" name="radio" id="radio3" value="radio" />
              <label for="radio3">발령일</label>
              <input type="radio" name="radio" id="radio4" value="radio" />
              <label for="radio4">등록일</label></td>
          </tr>
          <tr>
            <td colspan="3"><label for="textfield"></label>
              <input name="textfield" type="text" class="datepicker" id="textfield" />
              ~
              <input name="textfield2" type="text" class="datepicker" id="textfield2" /></td>
          </tr>
        </table>
        <div class="btn_dp">
          <button type="button">초기화</button>
          <button type="button" onClick="loadData()">조회</button>
        </div>
      </form>
    </div>
  </section>
  <section>
    <div>
      <div class="btn_dp">
        <button type="button">엑셀 다운로드</button>
        <a href="/Templates/발생경보등록.html" class="btn new">등록</a> </div>
      <div style="clear:both">
        <table id="jsonmap">
        </table>
        <div id="pjmap"> </div>
      </div>
      <script type="text/javascript">

		jQuery("#jsonmap").jqGrid({        
			url:'/sample/data9.json',
			datatype: "json",
			colNames : [
						'일련번호'		
						,'발생제목'		
						,'병해충코드'		
						//,'기타병해충명'	
						,'병해충명'	
						,'발령행정기관코드'		
						,'발령기관'	
						,'발령일시'		
						,'발령구분'		
						,'발령지역명'		
						,'발령내용'		
						//,'첨부파일ID'		
						,'등록자ID'		
						,'등록일시'		
						,'수정자ID'		
						,'수정일시'	    
						],
			colModel:[
				// {name:'발생경보관리번호' ,	width:30, 	align:"center"}
				{name:'일련번호' ,	width:70, 	align:"center" , editable:true}
				,{name:'발생제목' ,	width:150, 	align:"center"}
				,{name:'병해충코드' ,	width:55, 	align:"center", editable:true}
				,{name:'병해충명' ,	width:70, 	align:"center" , editable:true}
				//,{name:'기타병해충명' ,	width:70, 	align:"center" , editable:true}
				,{name:'발령행정기관코드' ,	width:50, 	align:"left" , editable:true}
				,{name:'발령기관' ,	width:100, 	align:"left" , editable:true}
				,{name:'발령일시' ,	width:70, 	align:"center" , editable:true}
				,{name:'발령구분' ,	width:50, 	align:"center" , editable:true}
				,{name:'발령지역명' ,	width:100, 	align:"center"	, editable:true}
				,{name:'발령내용' ,	width:100, 	align:"center"	, editable:true}
				//,{name:'첨부파일ID' ,	width:100, 	align:"center", editable:true}
				,{name:'등록자ID' ,	width:100, 	align:"center", editable:true}
				,{name:'등록일시' ,	width:100, 	align:"center", editable:true}
				,{name:'수정자ID' ,	width:100, 	align:"center", editable:true}
				,{name:'수정일시' ,	width:100, 	align:"center", editable:true}
			]
			, rowNum:20
			, rowList:[10,20,30]
			, pager: '#pjmap'
			, viewrecords: true
			, height: '320'
			, caption : '발생경보리스트'
			//, multiselect: true
			, autowidth : true
			, shrinkToFit : false
			, editurl : 'test.jsp'
			, onSelectRow : function(rowid, status) {
				if ( status ) {
					var data = $(this).getRowData(rowid);
					$(this).newWin("발생경보상세.html", data['사업명']);
				}
			}
			
			/*,onCellSelect: function(rowid, iCol){      
				 var list = jQuery("#jsonmap").getRowData(rowid);
				 alert(iCol);
				 if(iCol==0	){
					alert("checkbox");
				 }else{
				 	var data = $(this).getRowData(rowid);
					$(this).newWin("방제계획상세.html", data['사업명']);
				 }
			 }*/
			
		});
		
		jQuery("#jsonmap").jqGrid('navGrid','#pjmap',{}
		, {height:280,reloadAfterSubmit:false} // edit options
		, {height:280,reloadAfterSubmit:false} // add options
		, {reloadAfterSubmit:false} // del options
		);
		jQuery("#jsonmap").jqGrid("setFrozenColumns");
		</script> 
    </div>
  </section>
</div>
